package cn.com.nes.mybatis.agent.contract.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * </p>
 * @author nes
 * @since 2022-08-17
 */
@TableName("contract_info")
public class ContractInfo extends Model<ContractInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 合同id
     */
    @TableId(value = "id")
    private String id;

    /**
     * 公司id
     */
    @TableField("company_id")
    private String companyId;

    /**
     * 合同编号
     */
    @TableField("contract_number")
    private String contractNumber;

    /**
     * 合同名称
     */
    @TableField("`name`")
    private String name;

    /**
     * 合同类型
     */
    private Integer type;

    /**
     * 对方公司名称
     */
    @TableField("company_name")
    private String companyName;

    /**
     * 对方公司联系人
     */
    @TableField("contact_person")
    private String contactPerson;

    /**
     * 合同金额
     */
    @TableField("contract_amount")
    private BigDecimal contractAmount;

    /**
     * 录入人uid
     */
    @TableField("creator_id")
    private Long creatorId;

    /**
     * 是否终止，0-未终止，1-已终止
     */
    @TableField("`terminated`")
    private Integer terminated;

    /**
     * 合同生效日
     */
    @TableField("effective_date")
    private Date effectiveDate;

    /**
     * 合同终止日
     */
    @TableField("termination_date")
    private Date terminationDate;

    /**
     * 审核状态，0-待审核，1-审核通过，2-审核未通过
     */
    @TableField("audit_state")
    private Integer auditState;

    /**
     * oss地址
     */
    @TableField("oss_path")
    private String ossPath;

    /**
     * 创建日期
     */
    @TableField("gmt_create")
    private Date gmtCreate;

    /**
     * 修改日期
     */
    @TableField("gmt_modified")
    private Date gmtModified;

    /**
     * 是否删除
     */
    private Integer deleted;

    @TableField("file_name")
    private String fileName;

    /**
     * 商机id
     */
    @TableField("opportunity_id")
    private String opportunityId;

    /**
     * 客户ID
     */
    @TableField("customer_id")
    private String customerId;

    /**
     * 客户名称
     */
    @TableField("customer_name")
    private String customerName;

    @TableField("gmt_modified_id")
    private Long gmtModifiedId;

    @TableField("sale_order_id")
    private Long saleOderId;

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getOpportunityId() {
        return opportunityId;
    }

    public void setOpportunityId(String opportunityId) {
        this.opportunityId = opportunityId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getContractNumber() {
        return contractNumber;
    }

    public void setContractNumber(String contractNumber) {
        this.contractNumber = contractNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getContactPerson() {
        return contactPerson;
    }

    public void setContactPerson(String contactPerson) {
        this.contactPerson = contactPerson;
    }

    public BigDecimal getContractAmount() {
        return contractAmount;
    }

    public void setContractAmount(BigDecimal contractAmount) {
        this.contractAmount = contractAmount;
    }

    public Long getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Long creatorId) {
        this.creatorId = creatorId;
    }

    public Integer getTerminated() {
        return terminated;
    }

    public void setTerminated(Integer terminated) {
        this.terminated = terminated;
    }

    public Date getEffectiveDate() {
        return effectiveDate;
    }

    public void setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
    }

    public Date getTerminationDate() {
        return terminationDate;
    }

    public void setTerminationDate(Date terminationDate) {
        this.terminationDate = terminationDate;
    }

    public Integer getAuditState() {
        return auditState;
    }

    public void setAuditState(Integer auditState) {
        this.auditState = auditState;
    }

    public String getOssPath() {
        return ossPath;
    }

    public void setOssPath(String ossPath) {
        this.ossPath = ossPath;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public Long getGmtModifiedId() {
        return gmtModifiedId;
    }

    public void setGmtModifiedId(Long gmtModifiedId) {
        this.gmtModifiedId = gmtModifiedId;
    }

    public Long getSaleOderId() {
        return saleOderId;
    }

    public void setSaleOderId(Long saleOderId) {
        this.saleOderId = saleOderId;
    }

    public static final String ID = "id";

    public static final String COMPANY_ID = "company_id";

    public static final String CONTRACT_NUMBER = "contract_number";

    public static final String NAME = "name";

    public static final String TYPE = "type";

    public static final String COMPANY_NAME = "company_name";

    public static final String CONTACT_PERSON = "contact_person";

    public static final String CONTRACT_AMOUNT = "contract_amount";

    public static final String CREATOR_ID = "creator_id";

    public static final String TERMINATED = "terminated";

    public static final String EFFECTIVE_DATE = "effective_date";

    public static final String TERMINATION_DATE = "termination_date";

    public static final String AUDIT_STATE = "audit_state";

    public static final String OSS_PATH = "oss_path";

    public static final String GMT_CREATE = "gmt_create";

    public static final String GMT_MODIFIED = "gmt_modified";

    public static final String DELETED = "deleted";

    public static final String FILENAME = "file_name";

    public static final String OPPORTUNITY_ID = "opportunity_id";
    public static final String CUSTOMER_ID = "customer_id";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ContractInfo{" + "  id=" + id + ", companyId=" + companyId + ", contractNumber=" + contractNumber + ", name=" + name + ", type=" + type + ", companyName=" + companyName + ", contactPerson=" + contactPerson + ", contractAmount=" + contractAmount + ", creatorId=" + creatorId + ", terminated=" + terminated + ", effectiveDate=" + effectiveDate + ", terminationDate=" + terminationDate + ", auditState=" + auditState + ", ossPath=" + ossPath + ", gmtCreate=" + gmtCreate + ", gmtModified=" + gmtModified + ", deleted=" + deleted + ", fileNae=" + fileName + ", opportunityId=" + opportunityId + "}";
    }

    public ContractInfo() {
    }

    public ContractInfo(String companyId, String contractNumber, String name, Integer type, String companyName,
            String contactPerson, BigDecimal contractAmount, Long creatorId, Integer terminated, Date effectiveDate,
            Date terminationDate, Integer auditState, String ossPath, Integer deleted, String opportunityId,
            String customerId) {
        this.companyId = companyId;
        this.contractNumber = contractNumber;
        this.name = name;
        this.type = type;
        this.companyName = companyName;
        this.contactPerson = contactPerson;
        this.contractAmount = contractAmount;
        this.creatorId = creatorId;
        this.terminated = terminated;
        this.effectiveDate = effectiveDate;
        this.terminationDate = terminationDate;
        this.auditState = auditState;
        this.ossPath = ossPath;
        this.deleted = deleted;
        this.opportunityId = opportunityId;
        this.customerId = customerId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

}
